package com.hgw.Demo02_adapterPattern.objectAdapter;

/**
 * Data time:2021/12/14 09:35
 * StudentID:2019112118
 * Author:hgw
 * Description: 适配器类，实现 SDCard
 */
public class SDAdapterTF implements SDCard {
    private TFCardImpl tfCard;

    public SDAdapterTF(TFCardImpl tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("adapter read TFCard");
        return tfCard.readTF();
    }

    @Override
    public void writeSD(String msg) {
        System.out.println("adapter write TFCard");
        tfCard.writTF(msg);
    }
}
